package com.itheima.mapper;

import com.github.pagehelper.Page;
import com.itheima.domain.pojo.OperateLog;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author:篍
 * @Date: 2025/07/18 9:16
 * @Description:
 */
@Mapper
public interface OperateLogMapper {

    @Insert("insert into operate_log values (null,#{operateEmpId},#{operateTime},#{className},#{methodName}," +
            "#{methodParams},#{returnValue},#{costTime})")
    void addOperateLog(OperateLog operateLog);


    @Select("select operate_log.*,emp.username as operateEmpName from operate_log left join emp on operate_emp_id=emp.id")
    List<OperateLog> pageListLog();
}
